1. Field of the Invention
The present invention relates to a system for controlling the rate of flow of data from a variable data source, that, in conjunction with a buffer, outputs data at a constant rate. The invention also includes the circuitry for implementing such a system.
2. Description of the Related Art
The invention can be included in the field of control systems which take data from a variable rate source and transmit that data at a constant bit rate (where bit rate is a measurement of the quantity of information transmitted during a unit of time). To obtain a constant bit rate at the output when, at the input there is a data source generating data at a variable rate, it is necessary to use a delay memory (i.e. a buffer).
As is well-known, the buffer can be considered to be a recurrent memory, in which the data are read (outputted) serially at a constant frequency fr, but written (inputted) serially at a variable frequency fw (t). To avoid information losses, it is absolutely necessary to ensure that the pointers Pr for reading (increasing uniformly versus time) and the pointers for writing Pw (increasing in a variable manner versus time) do not overtake each other while the system is running, but instead maintain a suitable distance apart from one another. The difference between the writing pointer and the reading pointer represents the filling degree of the buffer (i.e. the buffer status).
A typical prior art control system has the structure shown in FIG. 1. The data Din (15) coming from the variable source S (1) are written in the BUFFER (3) in the locations of memory Pw generated by the written counter Conts (4), at a rate determined by clock Cks (16) (which has a variable frequency); similarly, the output data Dout (17) are read from the BUFFER (3) in the locations of memory Pr generated by the reading counter Contl (4'), working with the clock Ckl (18) (which has a constant frequency). The degree of buffer filling is determined by the difference between the pointers Pw and Pr calculated from the Diff (5). The rate of flow of data generated by the variable data source S is controlled by applying to the source an operating mode signal, output of register RE (7); the lower the operating mode, the greater the information quantity generated by the source (i.e., the higher the data rate) and the better the quality of the transmitted data, and vice versa. The operating mode is applied to the source with a control frequency established by the clock Ckc (19). The period of clock Ckc depends on the nature of the application: in video compression applications, typically, the period of clock Ckc corresponds to a so-called stripe period (8 video lines) or to a so-called macroblock period (1/N of stripe period), in dependence of the type of compression algorithm adopted. The mode signal is then obtained, at the successive time instants (t.sub.o, t.sub.1, t.sub.2, . . . t.sub.k, t.sub.k+1, t.sub.k+2, . . .) defined by the clock Ckc, as a function of the buffer status (buffer filling degree) at those time instants. In other words, the operating mode signal used to control the variable data source S during time instants between t.sub.k (comprised) and t.sub.k+1 (excluded) has a value that is a function of the buffer filling degree measured at time t.sub.k. Generally, alarm signals ALL (20) (overlapping or overtaking of the pointers), overflow control signals OV (21) (filling about to exceed the buffer dimensions) and underflow control signals UND (22) (filling approaching zero) are also generated to manage anomalous running situations.
Various buffer control strategies are well-known. Some strategies tend to keep the buffer filling constant whenever possible (typically equal to half the buffer dimensions); other strategies tend to obtain a mean bit rate at output, applying modes proportional to the buffer filling degree, using constant memory sectors for each running mode (an example is shown in FIG. 2), establishing in all cases a fixed relation between the buffer status (or filling degree) (abscissa) and the operating mode (ordinate).
The main drawbacks of the well-known techniques are mainly the limited capacity of mediation (cooperation) between source and output due to the assignment of limited buffer areas to each running mode. This causes the transmitted data quality to be excessively variable versus time, since it is closely connected to the activity of the source, thereby leading to a deterioration of the system performance.
It is true that it is possible to reduce these disadvantages by increasing the buffer dimensions, but it is also true that, among other things, the system costs and the round trip delay (the delay between data generation and its use) are increased.